Skip to content

Commit da28043

Browse files
authored
Merge pull request #641 from sizvix/patch-1
URL constructor to get a clean url_prefix (fix #640)
2 parents 8dc2684 + 6b228c0 commit da28043

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp/server/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
throw new Error("already running");
420420
}
421421
controller.value = new AbortController();
422-
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, url_prefix: document.baseURI.replace(/\/+$/, '') })) {
422+
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, url_prefix: new URL('.', document.baseURI).origin })) {
423423
const data = chunk.data;
424424

425425
if (data.stop) {

0 commit comments

Comments
 (0)